package asn.match.model;

// Generated 15 juin 2014 03:03:18 by Hibernate Tools 4.0.0

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;

import static javax.persistence.GenerationType.IDENTITY;

import javax.persistence.CascadeType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.UniqueConstraint;

/**
 * MemberAccount generated by hbm2java
 */
@SuppressWarnings("serial")
@Entity
@Table(name = "member_account", catalog = "muslima_sphere", uniqueConstraints = {
		@UniqueConstraint(columnNames = "profil_id"),
		@UniqueConstraint(columnNames = "email") })
public class MemberAccount implements java.io.Serializable {

	private Integer idMemberAccount;
	private Profil profil;
	private String linkname;
	private String email;
	private String password;
	private String validationCode;
	private String firstName;
	private String lastName;
	private String civility;
	private Integer suspectReported;
	private String maritalStatus;
	private Date birthday;
	private String phoneNumber;
	private String country;
	private String region;
	private String departement;
	private String city;
	private Integer zipCode;
	private String status;
	private Date lastConnectionDate;
	private String connectionStatus;
	private Double lastLatitude;
	private Double lastLongitude;
	private Date createdAt;
	private Date modifiedAt;
	private Set<InternalMessage> internalMessagesForTargetMemberId = new HashSet<InternalMessage>(
			0);
	private Set<InternalMessage> internalMessagesForSourceMemberId = new HashSet<InternalMessage>(
			0);
	private Set<FriendRelation> friendRelationsForSourceMemberId = new HashSet<FriendRelation>(
			0);
	private Set<FriendRelation> friendRelationsForTargetMemberId = new HashSet<FriendRelation>(
			0);

	public MemberAccount() {
	}

	public MemberAccount(Profil profil, String email, String password,
			String maritalStatus, String status, String connectionStatus,
			Date createdAt, Date modifiedAt) {
		this.profil = profil;
		this.email = email;
		this.password = password;
		this.maritalStatus = maritalStatus;
		this.status = status;
		this.connectionStatus = connectionStatus;
		this.createdAt = createdAt;
		this.modifiedAt = modifiedAt;
	}

	public MemberAccount(Profil profil, String linkname, String email,
			String password, String validationCode, String firstName,
			String lastName, String civility, Integer suspectReported,
			String maritalStatus, Date birthday, String phoneNumber,
			String country, String region, String departement, String city,
			Integer zipCode, String status, Date lastConnectionDate,
			String connectionStatus, Double lastLatitude, Double lastLongitude,
			Date createdAt, Date modifiedAt,
			Set<InternalMessage> internalMessagesForTargetMemberId,
			Set<InternalMessage> internalMessagesForSourceMemberId,
			Set<FriendRelation> friendRelationsForSourceMemberId,
			Set<FriendRelation> friendRelationsForTargetMemberId) {
		this.profil = profil;
		this.linkname = linkname;
		this.email = email;
		this.password = password;
		this.validationCode = validationCode;
		this.firstName = firstName;
		this.lastName = lastName;
		this.civility = civility;
		this.suspectReported = suspectReported;
		this.maritalStatus = maritalStatus;
		this.birthday = birthday;
		this.phoneNumber = phoneNumber;
		this.country = country;
		this.region = region;
		this.departement = departement;
		this.city = city;
		this.zipCode = zipCode;
		this.status = status;
		this.lastConnectionDate = lastConnectionDate;
		this.connectionStatus = connectionStatus;
		this.lastLatitude = lastLatitude;
		this.lastLongitude = lastLongitude;
		this.createdAt = createdAt;
		this.modifiedAt = modifiedAt;
		this.internalMessagesForTargetMemberId = internalMessagesForTargetMemberId;
		this.internalMessagesForSourceMemberId = internalMessagesForSourceMemberId;
		this.friendRelationsForSourceMemberId = friendRelationsForSourceMemberId;
		this.friendRelationsForTargetMemberId = friendRelationsForTargetMemberId;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id_member_account", unique = true, nullable = false)
	public Integer getIdMemberAccount() {
		return this.idMemberAccount;
	}

	public void setIdMemberAccount(Integer idMemberAccount) {
		this.idMemberAccount = idMemberAccount;
	}

	@ManyToOne(fetch = FetchType.LAZY, cascade={CascadeType.PERSIST,CascadeType.REMOVE})
	@JoinColumn(name = "profil_id", unique = true, nullable = false)
	public Profil getProfil() {
		return this.profil;
	}

	public void setProfil(Profil profil) {
		this.profil = profil;
	}

	@Column(name = "linkname", length = 80)
	public String getLinkname() {
		return this.linkname;
	}

	public void setLinkname(String linkname) {
		this.linkname = linkname;
	}

	@Column(name = "email", unique = true, nullable = false, length = 80)
	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	@Column(name = "password", nullable = false, length = 32)
	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	@Column(name = "validation_code", length = 80)
	public String getValidationCode() {
		return this.validationCode;
	}

	public void setValidationCode(String validationCode) {
		this.validationCode = validationCode;
	}

	@Column(name = "first_name", length = 25)
	public String getFirstName() {
		return this.firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	@Column(name = "last_name", length = 25)
	public String getLastName() {
		return this.lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	@Column(name = "civility", length = 8)
	public String getCivility() {
		return this.civility;
	}

	public void setCivility(String civility) {
		this.civility = civility;
	}

	@Column(name = "suspect_reported")
	public Integer getSuspectReported() {
		return this.suspectReported;
	}

	public void setSuspectReported(Integer suspectReported) {
		this.suspectReported = suspectReported;
	}

	@Column(name = "marital_status", nullable = false, length = 9)
	public String getMaritalStatus() {
		return this.maritalStatus;
	}

	public void setMaritalStatus(String maritalStatus) {
		this.maritalStatus = maritalStatus;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "birthday", length = 10)
	public Date getBirthday() {
		return this.birthday;
	}

	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}

	@Column(name = "phone_number", length = 25)
	public String getPhoneNumber() {
		return this.phoneNumber;
	}

	public void setPhoneNumber(String phoneNumber) {
		this.phoneNumber = phoneNumber;
	}

	@Column(name = "country", length = 45)
	public String getCountry() {
		return this.country;
	}

	public void setCountry(String country) {
		this.country = country;
	}

	@Column(name = "region", length = 45)
	public String getRegion() {
		return this.region;
	}

	public void setRegion(String region) {
		this.region = region;
	}

	@Column(name = "departement", length = 45)
	public String getDepartement() {
		return this.departement;
	}

	public void setDepartement(String departement) {
		this.departement = departement;
	}

	@Column(name = "city", length = 45)
	public String getCity() {
		return this.city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	@Column(name = "zip_code")
	public Integer getZipCode() {
		return this.zipCode;
	}

	public void setZipCode(Integer zipCode) {
		this.zipCode = zipCode;
	}

	@Column(name = "status", nullable = false, length = 21)
	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "last_connection_date", length = 19)
	public Date getLastConnectionDate() {
		return this.lastConnectionDate;
	}

	public void setLastConnectionDate(Date lastConnectionDate) {
		this.lastConnectionDate = lastConnectionDate;
	}

	@Column(name = "connection_status", nullable = false, length = 8)
	public String getConnectionStatus() {
		return this.connectionStatus;
	}

	public void setConnectionStatus(String connectionStatus) {
		this.connectionStatus = connectionStatus;
	}

	@Column(name = "last_latitude", precision = 16, scale = 10)
	public Double getLastLatitude() {
		return this.lastLatitude;
	}

	public void setLastLatitude(Double lastLatitude) {
		this.lastLatitude = lastLatitude;
	}

	@Column(name = "last_longitude", precision = 16, scale = 10)
	public Double getLastLongitude() {
		return this.lastLongitude;
	}

	public void setLastLongitude(Double lastLongitude) {
		this.lastLongitude = lastLongitude;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "created_at", nullable = false, length = 19)
	public Date getCreatedAt() {
		return this.createdAt;
	}

	public void setCreatedAt(Date createdAt) {
		this.createdAt = createdAt;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "modified_at", nullable = false, length = 19)
	public Date getModifiedAt() {
		return this.modifiedAt;
	}

	public void setModifiedAt(Date modifiedAt) {
		this.modifiedAt = modifiedAt;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "memberAccountByTargetMemberId", cascade={CascadeType.PERSIST,CascadeType.REMOVE})
	public Set<InternalMessage> getInternalMessagesForTargetMemberId() {
		return this.internalMessagesForTargetMemberId;
	}

	public void setInternalMessagesForTargetMemberId(
			Set<InternalMessage> internalMessagesForTargetMemberId) {
		this.internalMessagesForTargetMemberId = internalMessagesForTargetMemberId;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "memberAccountBySourceMemberId", cascade={CascadeType.PERSIST,CascadeType.REMOVE})
	public Set<InternalMessage> getInternalMessagesForSourceMemberId() {
		return this.internalMessagesForSourceMemberId;
	}

	public void setInternalMessagesForSourceMemberId(
			Set<InternalMessage> internalMessagesForSourceMemberId) {
		this.internalMessagesForSourceMemberId = internalMessagesForSourceMemberId;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "memberAccountBySourceMemberId", cascade={CascadeType.PERSIST,CascadeType.REMOVE})
	public Set<FriendRelation> getFriendRelationsForSourceMemberId() {
		return this.friendRelationsForSourceMemberId;
	}

	public void setFriendRelationsForSourceMemberId(
			Set<FriendRelation> friendRelationsForSourceMemberId) {
		this.friendRelationsForSourceMemberId = friendRelationsForSourceMemberId;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "memberAccountByTargetMemberId", cascade={CascadeType.PERSIST,CascadeType.REMOVE})
	public Set<FriendRelation> getFriendRelationsForTargetMemberId() {
		return this.friendRelationsForTargetMemberId;
	}

	public void setFriendRelationsForTargetMemberId(
			Set<FriendRelation> friendRelationsForTargetMemberId) {
		this.friendRelationsForTargetMemberId = friendRelationsForTargetMemberId;
	}

}
